From 999fc9bc6cd30ad80c8467aea784fbad9441e8d2 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Fri, 17 Dec 2010 14:16:41 +0000 Subject: [PATCH] x86, atomic: Fix 32-bit version of atomic_write64(). Signed-off-by: Keir Fraser --- xen/include/asm-x86/atomic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/include/asm-x86/atomic.h b/xen/include/asm-x86/atomic.h index 30ead03ce7..9bf3803cd6 100644 --- a/xen/include/asm-x86/atomic.h +++ b/xen/include/asm-x86/atomic.h @@ -36,7 +36,7 @@ static inline uint64_t atomic_read64(const volatile uint64_t *addr) static inline void atomic_write64(volatile uint64_t *addr, uint64_t val) { uint64_t old = *addr, new, *__addr = (uint64_t *)addr; - while ( (old = __cmpxchg8b(__addr, old, val)) != old ) + while ( (new = __cmpxchg8b(__addr, old, val)) != old ) old = new; } #endif -- 2.30.2